import request from '@/util/request'

export function getGoods(data) {
	return request.post('/api/activity/for_student',data);
}

export function goodsDetial(id) {
	return request.get('/api/activity/'+ id +'/view');
}

export function detialGoods(id) {
	return request.get('/api/activity/'+ id +'/goods');
}

export function creatOrder(data) {
	return request.post('/api/order/create_pay_by_mini',data);
}

export function getOrder(params) {
	return request.get('/api/order',{ params });
}

export function getAfterOrder(params) {
	return request.get('/api/order/after_sale',{ params });
}

export function changeNum(data) {
	return request.post('/api/order/change',data);
}

export function orderPay(data) {
	return request.post('/api/order/pay',data);
}

export function orderDetial(data) { //id
	return request.post('/api/order/pay',data);
}

export function paycancel(data) {
	return request.post('/api/order/cancel',data);
}

export function orderDetials(data) { //id
	return request.post('/api/order/detail',data);
}

export function reason_list(data) { //id
	return request.post('/api/order/after_sale/reason_list',data);
}
// export function paycancel(data) {
// 	return request.post('/api/order/cancel',data);
// }
export function reafter(data) { //id
	return request.post('/api/order/after_sale/refund_apply',data);
}

export function confirming(id) { //id
	return request.get('/api/order/pay/confirming?order_id=' + id);
}

export function afterAaleDetail(data) { //id
	return request.post('/api/order/after_sale/detail',data);
}

export function completeOrder(data) { //完成订单传id=
	return request.post('/api/order/complete',data);
}

export function receipTOrder(data) { //
	return request.post('/api/order/receipt',data);
}

export function computTOrder(data) { //完成订单传id=
	return request.post('/api/order/complete',data);
}

export function delTOrder(data) { 
	return request.post('/api/order/del',data);
}

export function removeAfter(data) { 
	return request.post('/api/order/after_sale/refund_cancel',data);
}


export function payReslut(id) { 
	return request.get('/api/order/pay/result?id=' + id);
}

